laravel storage

41

laravel storage get file path -

use Illuminate\Support\Facades\Storage;

$path = Storage::path('file.jpg');

laravel storage -

use Illuminate\Support\Facades\Storage;

Storage::disk('local')->put('example.txt', 'Contents');

laravel local file storage -

use Illuminate\Support\Facades\Storage;
 
Storage::disk('local')->put('example.txt', 'Contents');

laravel store file -

$path = $request->file('avatar')->store(
    'avatars', 'public'
);

laravel filesystem -

$exists = Storage::disk('s3')->exists('file.jpg');

Comments

Submit
0 Comments